Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

C++ error mysql LNK: 2019 i LNK: 1120


Rekomendowane odpowiedzi

Opublikowano

Zaczne od poczatku, gdy dodalem bilbioteke mysql do visual studio 2013 to zaczelo wywalać dziewne błędy, nie ogarniam co jest przyczyną. O to one :

Error	4	error LNK2019: unresolved external symbol _mysql_store_result@ referenced in function "private: bool __thiscall Selection::CharDelSlotCheck(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?CharDelSlotCheck@Selection@@AAE_NHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)	C:\Users\Weronika\Downloads\Gameserve and login server 0.6\Gameserve and login server 0.6\Gameserverproject\Game server\main.obj	Game server
Error	3	error LNK2019: unresolved external symbol _mysql_query@ referenced in function "private: bool __thiscall Selection::CharDelRemove(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?CharDelRemove@Selection@@AAE_NHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)	C:\Users\Weronika\Downloads\Gameserve and login server 0.6\Gameserve and login server 0.6\Gameserverproject\Game server\main.obj	Game server
Error	1	error LNK2019: unresolved external symbol _mysql_num_rows@ referenced in function "private: bool __thiscall Selection::CharDelSlotCheck(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?CharDelSlotCheck@Selection@@AAE_NHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)	C:\Users\Weronika\Downloads\Gameserve and login server 0.6\Gameserve and login server 0.6\Gameserverproject\Game server\main.obj	Game server
Error	5	error LNK2019: unresolved external symbol _mysql_free_result@ referenced in function "private: bool __thiscall Selection::CharDelSlotCheck(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?CharDelSlotCheck@Selection@@AAE_NHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)	C:\Users\Weronika\Downloads\Gameserve and login server 0.6\Gameserve and login server 0.6\Gameserverproject\Game server\main.obj	Game server
Error	6	error LNK2019: unresolved external symbol _mysql_fetch_row@ referenced in function "private: bool __thiscall Selection::CharLoad(int,int,int)" (?CharLoad@Selection@@AAE_NHHH@Z)	C:\Users\Weronika\Downloads\Gameserve and login server 0.6\Gameserve and login server 0.6\Gameserverproject\Game server\main.obj	Game server
Error	2	error LNK2019: unresolved external symbol _mysql_error@ referenced in function "private: bool __thiscall Selection::CharDelRemove(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?CharDelRemove@Selection@@AAE_NHV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)	C:\Users\Weronika\Downloads\Gameserve and login server 0.6\Gameserve and login server 0.6\Gameserverproject\Game server\main.obj	Game server
Error	7	error LNK1120: 6 unresolved externals	C:\Users\Weronika\Downloads\Gameserve and login server 0.6\Gameserve and login server 0.6\Gameserverproject\Debug\Game server.exe	Game server

Dodam ze mam bibliotek win 32 i debugera 32 win.

Szukasz kogoś kto wykona grafikę, logo do drużyny esportowej? 


Napisz do mnie postaram się wykonać prace jak najlepiej.


Aktualnie nie mam czasu na wykonywanie grafik.

Opublikowano

Te dołączone razem z biblioteką. W dokumentacji powinny być napisane jakie dokładnie.

tak dodalem libmysql.lib, to jest raczej jedyny lib do tej bilbioteki, który trzeba dodac

Szukasz kogoś kto wykona grafikę, logo do drużyny esportowej? 


Napisz do mnie postaram się wykonać prace jak najlepiej.


Aktualnie nie mam czasu na wykonywanie grafik.

Opublikowano

Czy ten lib jest przeznaczony dla tej samej architektury, dla której jest pisany projekt?

Tak, moge ci podac nawet link do tego projektu, robie serwer do gry, i mam jakies problemy nie wiadomo jakie, na agielski niemieckim, forum zadałem tez takie pytanie, to odpisali mi: 

 

 

 

These errors are called linker errors and are caused due to not linking the needed libraries in the project solution. It appears you only got the function declarations in the headers but not the actual function definitions.

 

I've never seen these function names in a MySQL library, are you sure you are linking all other required libraries to your project?    

 

Dałem mu linka do tego projektu, i powiedziałem ze nie jestem pewny czy mam wszystkie wymagane bilbioteki.

 

@Edit

Problem rozwiazany wystarczylo zmienic debug na relase.

Temat od zamknecia.

Szukasz kogoś kto wykona grafikę, logo do drużyny esportowej? 


Napisz do mnie postaram się wykonać prace jak najlepiej.


Aktualnie nie mam czasu na wykonywanie grafik.

Weteran
Opublikowano
These errors are called linker errors and are caused due to not linking the needed libraries in the project solution. It appears you only got the function declarations in the headers but not the actual function definitions.

Dlatego spytałem się o liby. Problem jest w tym, że nawet jeśli dołączysz liby do projektu, a są w innej architekturze niż projekt, to nie wyświetli się żaden błąd z tym związany i linker będzie je ignorował.

I've never seen these function names in a MySQL library, are you sure you are linking all other required libraries to your project?    

Nie widział takich funkcji jak mysql_store_result, mysql_query, mysql_num_rows? Przecież to podstawowe funkcji każdej implementacji mysql.

 

Tak, możesz dać link do projektu.

Opublikowano

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...